Returns the ReadOnlyCollection<FileNodeReader> containing the <file> nodes within this <resource>.
Parent Type: ResourceNodeReader
Namespace: Microsoft.LearningComponents.Manifest
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public ReadOnlyCollection<FileNodeReader> Files { get; } |
| Exception type | Condition |
| InvalidPackageException | In |
The ReadOnlyCollection returned from this method is not populated until properties or methods on it are accessed. This means that in ManifestReaderSettings.FixScormRequirementViolations=false, InvalidPackageException may be thrown if there are invalid nodes in the list (e.g. nodes containing illegal attribute values.)
In ManifestReaderSettings.FixScormRequirementViolations=true, warnings are added to the log and invalid nodes are ignored.
If there are no nodes of the specified type, an empty ReadOnlyCollection is returned.
Note that dependency files are not included in this list. Applications should access the Dependency property to build a full list of files for this resource.
Given an ActivityNodeReader, iterate through all files in all resources in all child activities.
| C# |
foreach (ActivityNodeReader child in activity.ChildActivities)
{
ResourceNodeReader resource = child.Resource;
if (resource != null)
{
foreach (FileNodeReader file in resource.Files)
{
// use the FileNodeReader
}
}
}
|